﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/AdminMasterPage.master" AutoEventWireup="true" CodeFile="quan-ly-slide-tin-tuc.aspx.cs" Inherits="Admin_quan_ly_slide_tin_tuc" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="grvNewsSlide" runat="server" AutoGenerateColumns="False" DataKeyNames="News_SlideID"
        onrowcancelingedit="grvNewsSlide_RowCancelingEdit" 
        onrowdeleting="grvNewsSlide_RowDeleting" onrowediting="grvNewsSlide_RowEditing" 
        onrowupdating="grvNewsSlide_RowUpdating">
        <Columns>
            <asp:TemplateField HeaderText="Tiêu Đề">
                <ItemTemplate>
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("TieuDe") %>'></asp:Label></ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtTitle" runat="server" Text='<%# Eval("TieuDe") %>'></asp:TextBox>
                    </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Mô Tả">
                <ItemTemplate><asp:Label ID="lblDescrip" runat="server" Text='<%# Eval("MoTa") %>'></asp:Label></ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtDescrip" runat="server" Text='<%# Eval("MoTa") %>'></asp:TextBox>
                    </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Hình Ảnh">
                <ItemTemplate><img runat="server" alt="" width="50" src='<%# "~/"+Eval("DuongDan") %>' /></ItemTemplate>
                <EditItemTemplate>
                    <asp:FileUpload ID="fuBanner" runat="server" /></EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Active">
                <ItemTemplate>
                    <asp:CheckBox ID="cbActive" runat="server" Checked='<%# Eval("IsActive") %>' /></ItemTemplate>
                    <EditItemTemplate>
                        <asp:CheckBox ID="cbactive1" runat="server" Checked='<%# Eval("IsActive") %>' />
                    </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ButtonType="Button" HeaderText="Sửa" ShowEditButton="True" />
            <asp:CommandField ButtonType="Button" HeaderText="Xóa" 
                ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <h1>Thêm Slide</h1>
    <span>Chọn bài viết</span><asp:DropDownList ID="ddlPost" runat="server">
    </asp:DropDownList><span>Tiêu đề</span><asp:TextBox ID="txtTitle" runat="server"></asp:TextBox><span>Mô tả</span><asp:TextBox
        ID="txtDescrip" runat="server"></asp:TextBox><br /><span>Hình ảnh</span><asp:FileUpload
            ID="fuBanner" runat="server" /><asp:RadioButtonList ID="rblActive" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                <asp:ListItem Value="1" Selected="True">Active</asp:ListItem>
                <asp:ListItem Value="0" >UnActive</asp:ListItem>
            </asp:RadioButtonList>
    <asp:Button ID="btnOK" runat="server" Text="Thêm" onclick="btnOK_Click" />
</asp:Content>

